﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;

namespace ExamSharedClasses
{
    [Serializable()]
    public class City
    {
        public const string TABLENAME = "city";
        public const string CITY_ID = "city_id";
        public const string CITY_NAME = "city_name";
        
        public int CityId { get; set; }
        public string CityName { get; set; }

        public City()
        {
            this.CityId = -1;
            this.CityName = "";
        }
        public City(int cityId, string cityName)
        {
            this.CityId = cityId;
            this.CityName = cityName;
        }

        public override string ToString() {
            StringBuilder sb = new StringBuilder( "City: " );
            sb.Append( "ID: " + CityId.ToString() + ", " );
            if ( CityName != null )
                sb.Append( "NAME: " + CityName.ToString() + '\n' );
            return sb.ToString();
        }
   
    }

            
}
